﻿
using DotNetNeural.Data.Learning;
namespace DotNetNeural.Test.Helpers
{
    public class TrainingSetFactory
    {
        public ITrainingSet Create(int inputsCount, int outputsCount)
        {
            return Create(inputsCount, outputsCount, 0, 0);
        }

        public ITrainingSet Create(int inputsCount, int outputsCount, int itemsCount, int controlItemsCount)
        {
            ITrainingSet result = new TrainingSet(inputsCount, outputsCount);

            for (int i = 0; i < itemsCount; ++i)
            {
                result.AddItem(new TrainingSetItem(new float[inputsCount], new float[outputsCount]), false);
            }

            for (int i = 0; i < controlItemsCount; ++i)
            {
                result.AddItem(new TrainingSetItem(new float[inputsCount], new float[outputsCount]), true);
            }

            return result;
        }
    }
}
